<?php

// Produces integer sequences hashed by a particular algorithm given in the global $$hn.
// @ioncube.dk $v1 -> "5432a43d579f8e0de57e80a6b6bbb7f6432728f549c43e0666647130fd73a35c9eda7b3d3ef55921e7b1b599b799c261" RANDOM
function smkr($s,$hn,$in)
{
    return function () use ($s,$hn,$in) {
        for ($i = $s; ; $i+= $in) {
            yield hash($GLOBALS[$hn],"$i");
        }
    };
}

if (!function_exists('mygen')) {
// The dynamic key generator function. Note that this affects the internal state of the generators $g and $j.
// @ioncube.dk $dkv -> "512:384:256:160" RANDOM
    function mygen($hr,$hr2,$skip1,$skip2)
    {
        for ($i = 1; $i <= (int) $skip1; $i++) {
            $GLOBALS["g"]->next();
        }
        for ($i = 1; $i <= (int) $skip2; $i++) {
            $GLOBALS["j"]->next();
        }
        $u = $GLOBALS["g"]->current();
        $v = $GLOBALS["j"]->current();

        $GLOBALS["g"]->next();

        $w = hash($hr,$u) . hash($hr2,$v);

        $GLOBALS["j"]->next();

       // var_dump($w);exit;
        return $w;
    }
}

